package com.youease.chris.manager
{
	import com.youease.chris.model.vo.BigImageData;
	import com.youease.chris.model.vo.TextureData;
	import com.youease.chris.model.vo.TileData;
	
	import flash.utils.Dictionary;

	[Bindable]
	public class GlobalObject
	{
		//工程地址
		public static var projectDir:String;
		//当前选择的操作
		public static var currentOperater:OperateEnum = OperateEnum.SELECT;
		//当前选择的地图
		public static var currentMap:String;
		//当前选择的层
		public static var currentLayer:String;
		//当前选中的素材
		public static var currentTexture:TextureData;
		
		public static var canCross:Boolean = true;
		
		public static var mouseX:Number = 0;
		
		public static var mouseY:Number = 0;
		
		public static var gridX:int = 0;
		
		public static var gridY:int = 0;
		
		public static var oldGridX:int = 0;
		
		public static var oldGridY:int = 0;
		
		public static var sceneScale:int = 100;
		
		public static var lockLayers:Dictionary = new Dictionary();
		
		public static var crossLayerName:String = "cross";
		
		public static var cellWidth:Number = 100;
		
		public static var cellHeight:Number = 50;
		
		public static var currentBigImag:BigImageData;
		
		public static var centerGridX:int = 0;
		
		public static var centerGridY:int = 0;
		
		public static var rendererRange:int = 50;
		
		public static var texturesType:Object = {};//{land:1,farm:2,sand:3,mine:4,gold:5,villa:6,ruins:7,tree:8,hill:9,lake:10,road:11,building:12,car:13,coast:14,sea:15};
		
		public static var texturesName:Object = {};//{1:"新平地(land)",2:"农田(farm)",3:"沙地(sand)",4:"矿地(mine)",5:"金矿(gold)",6:"无人住宅区(villa)",7:"城市废墟(ruins)",8:"新森林(tree)",
												//9:"新山地(hill)",10:"新湖泊(lake)",11:"城市道路(road)",12:"建筑(building)",13:"汽车(car)",14:"海岸(coast)",15:"海水(sea)"};
		public static var texturesEnName:Object = {};
		
		public static var config:XML;
		
		public static var spaceDown:Boolean = false;
		
		private static var history:Array = new Array();
		
		public static function pushHistory(obj:Object):void {
			if(history.length>100) {
				history.shift();
			}
			history.push(obj);
		}
		
		public static function retriveHistory():Object {
			if(history.length>0) {
				return history.pop();
			}else {
				return null;
			}
		}
		
		public function GlobalObject()
		{
			throw new Error("这是一个纯粹的静态类，请不要试图实例化它。。");
		}
	}
}